Skip to content

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Mar 29, 2023

Summary of Changes

phpstan reported an issue. The comparison in the changed line is currently broken. The way the operators are used, the type attribute is first cast from a SimpleXMLElement to a string, then negated as a boolean and then compared against a string. Thus the comparison is always wrong. With the added parentheses, the comparison is actually working again.

Testing Instructions

Codereview

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@Hackwar
Copy link
Member Author

Hackwar commented Mar 29, 2023

Why make the code easy, when you can also make it difficult... I changed the ! to the ===...

@chmst
Copy link
Contributor

chmst commented Mar 29, 2023

I have not tested this item.

Tested the filter in an article field link A.
Same result before and after patch.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40229.

@chmst
Copy link
Contributor

chmst commented Mar 29, 2023

I have tested this item ✅ successfully on d972072

Tested the filter in an article field link A.
Same result before and after patch.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40229.

@joomdonation
Copy link
Contributor

I have tested this item ✅ successfully on d972072

The code is clearly wrong. I also did a real test by changing link A to a text field, enter a not valid URL google.com, and has it converted automatically to http://google.com (It should be https these days, but it is a different issue)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40229.

@joomdonation joomdonation added the RTC This Pull Request is Ready To Commit label Mar 29, 2023
@obuisard obuisard added this to the Joomla! 4.3.0 milestone Mar 29, 2023
@obuisard obuisard merged commit d5850ae into joomla:4.3-dev Mar 29, 2023
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 29, 2023
@obuisard
Copy link
Contributor

Thank you Hannes @Hackwar

@Hackwar Hackwar deleted the 4.3-urlfilter branch April 17, 2023 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants